package cn.data.stream.config.parse;

import cn.data.stream.annotation.DataStream;
import java.util.Map;
import java.util.Set;
import org.springframework.context.annotation.AnnotationBeanNameGenerator;

/**
 * @author shi hong yu
 */
public class DataStreamBeanNameGenerator extends AnnotationBeanNameGenerator {
    private final String dataStreamType = DataStream.class.getName();
    @Override
    protected boolean isStereotypeWithNameValue(String annotationType, Set<String> metaAnnotationTypes,
        Map<String, Object> attributes) {

        boolean isStereotype = annotationType.equals(dataStreamType)||	metaAnnotationTypes.contains(dataStreamType);
        return (isStereotype && attributes != null && attributes.containsKey("value"));
    }
}
